﻿@*新增学生用户组页面*@
@using EasyCourse.Model;
@{
    Layout = null;
    CommonPageInfo pageInfo = ViewData[CommonViewDataKey.CommonPageInfo] as CommonPageInfo;
    string para = "CourseId=" + pageInfo.CourseId;
}
<!DOCTYPE html>
<html lang="zh-CN">
<head>
    <meta charset="UTF-8">
    <title>新增学生用户组</title>
    @Html.Partial("~/Views/Share/PublicHeader.cshtml")
</head>
<body>
    @Html.Partial("~/Views/Share/PublicTopNav4Teacher.cshtml")
    <div class="container">
        <div class="row">
            <h1 class="topTitle-h1">@pageInfo.CourseName<br><small>广州中医药大学康复治疗微课程网络学习平台</small></h1>
        </div>
    </div>
    @*导航菜单*@
    @Html.Partial("~/Views/Share/PublicTeacherNaviMenu.cshtml", 3)
    <div class="container mainwrap">
        <div class="row">
            <div class="col-xs-2">
                <div class="dropdown theme-dropdown clearfix">
                    <a id="dropdownMenu1" href="#" role="button" class="sr-only dropdown-toggle" data-toggle="dropdown">Dropdown <span class="caret"></span></a>
                    <ul class="dropdown-menu" role="menu" aria-labelledby="dropdownMenu1">
                        <li role="presentation">
                            <a role="menuitem" tabindex="-1" href="/UserInfo/StudentList?@para"><span class="glyphicon glyphicon-list"></span> 学生用户列表</a>
                        </li>
                        <li role="presentation" class="divider"></li>
                        <li role="presentation">
                            <a role="menuitem" tabindex="-1" href="/UserInfo/AddStudent?@para"><span class="glyphicon glyphicon-user"></span> 新增学生用户</a>
                        </li>
                        <li role="presentation" class="divider"></li>
                        <li role="presentation">
                            <a role="menuitem" tabindex="-1" href="/UserInfo/StudentGrpList?@para"><span class="glyphicon glyphicon-list"></span> 学生用户组列表</a>
                        </li>
                        <li role="presentation" class="divider"></li>
                        <li class="active" role="presentation">
                            <a role="menuitem" tabindex="-1" href="javascript:void(0)"><span class="glyphicon glyphicon-plus"></span> 新增学生用户组</a>
                        </li>
                    </ul>
                </div>
            </div>
            <div class="col-xs-10">
                <div class="panel panel-default mainwrap-part">
                    <div class="panel-heading">
                        <ol class="breadcrumb">
                            <li>学生用户管理</li>
                            <li class="active">新增学生用户组</li>
                        </ol>
                    </div>
                    <div class="panel-body">
                        <div class="row">
                            <form class="form-horizontal" role="form">
                                <div class="form-group">
                                    <label class="control-label col-xs-2">组名：</label>
                                    <div class="col-xs-6">
                                        <input type="text" class="form-control" id="JgrpName" placeholder="请输入组名">
                                    </div>
                                </div>
                                <div class="form-group">
                                    <label class="control-label col-xs-2">备注：</label>
                                    <div class="col-xs-10">
                                        <textarea class="form-control" id="JgrpRemark" rows="5"></textarea>
                                    </div>
                                </div>
                                <div class="form-group">
                                    <div class="col-xs-offset-2 col-xs-10">
                                        <button type="button" id="JaddStdGrp" class="btn btn-success">新增</button>
                                        <button type="button" onclick="history.go(-1)" class="btn btn-success btn-md"><span class="glyphicon glyphicon-arrow-left"></span>返回</button>
                                    </div>
                                </div>
                            </form>
                        </div>
                    </div>
                </div>
            </div>
        </div>
    </div>
    @Html.Partial("~/Views/Share/PublicFooter.cshtml")
    @Html.Partial("~/Views/Share/PublicCommonJs.cshtml")
    <script>
        var grpName = $("#JgrpName"),
            grpRemark = $("#JgrpRemark");
        $("#JaddStdGrp").bind("click", function () {
            var _name = grpName.val(),
                _remark = grpRemark.val();
            $.easyPost("@Url.Action("AddGrp", "GrpManage")", {
                "GroupName": _name,
                "Remark": _remark
            }, function (data) {
                if (data.result) {
                    showTips.open("新增组成功！");
                    grpName.val('');
                    grpRemark.val('');
                } else {
                    showTips.open(data.message)
                }
            }, "json")
        })
    </script>
</body>
</html>